
module LinearVCO
    #(
        parameter DEPTH=16,
        parameter iWIDTH = 10, 
        parameter Fmclk=65000000
    )
    (
        input 	wire 	[DEPTH-1:0] i_vtune,//Unsigned input vtune
        input 	wire 	[31:0] i_StartFreq,
        input 	wire 	[31:0] i_EndFreq,
        input 	wire 	i_clk,
        input 	wire 	i_rst,
        output 	wire 	[DEPTH-1:0] o_WaveAddr
    );
    wire 	[63:0]ftune;
    wire 	[DEPTH-1:0]DDS_fctrl;
    
    assign 	ftune		=((((i_EndFreq - i_StartFreq)*i_vtune)>>iWIDTH)+i_StartFreq);
    assign 	DDS_fctrl	=(ftune <<DEPTH) / Fmclk;

    DirectDigitalSynthesizer
    #(
        .DEPTH(DEPTH)
    )
    DDS_VCO
    (
        .i_freq_ctrl(DDS_fctrl),
        .i_phas_ctrl(0),
        .i_clk(i_clk),
        .i_rst(i_rst),
        .o_WaveAddr(o_WaveAddr)
    );

endmodule